include('shared.lua')

/*---------------------------------------------------------
   Name: ENT:Initialize()
---------------------------------------------------------*/
function ENT:Initialize()
	self.OneTime = true
end

/*---------------------------------------------------------
   Name: ENT:Draw()
---------------------------------------------------------*/
function ENT:Draw()
	self.Entity:DrawModel()
end

/*---------------------------------------------------------
   Name: ENT:Think()
---------------------------------------------------------*/
function ENT:Think()

	if self.Entity:WaterLevel() > 2 then return end

	if (self.Entity:GetDTBool(0)) then
		local light = DynamicLight(self:EntIndex())
		if (light) then
			light.Pos = self:GetPos()
			light.r = 255
			light.g = 115
			light.b = 40
			light.Brightness = 1
			light.Decay = math.random(500, 800) * 5
			light.Size = math.random(500, 800)
			light.DieTime = CurTime() + 1
		end
	end

	if (self.Entity:GetDTBool(0) and self.OneTime) then
		self.OneTime = false
	end
end


